package com.lbm.baseclass.exception;

public class ServiceException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	private String errorCode = "UNKNOW_ERROR";
	protected String[] errorArgs = null;
	private String errorMessage = null;
	public ServiceException() {
		super();
	}

	public ServiceException(String errorCode, String[] errorArgs) {
		this.errorCode = errorCode;
		this.errorArgs = errorArgs;
	}

	public ServiceException(String errorCode, String errorArg) {
		this.errorCode = errorCode;
		this.errorArgs = new String[] { errorArg };
	}

	public ServiceException(String errorCode, String[] errorArgs,
			Throwable cause) {
		super(cause);
		this.errorCode = errorCode;
		this.errorArgs = errorArgs;
	}

	public ServiceException(String errorCode, String errorArg, Throwable cause) {
		super(cause);
		this.errorCode = errorCode;
		this.errorArgs = new String[] { errorArg };
	}

	public ServiceException(String errorMessage) {
		this.errorMessage = errorMessage;
	}
	public String getMessage() {
		return errorMessage;

	}

	public String getErrorCode() {
		return errorCode;
	}
}